from appium.webdriver.common.mobileby import MobileBy

from page.basepage import BasePage
from page.editmember_page import EditMemberPage


class MemberInfoPage(BasePage):

    option_dict = {
        "option_page":"more",
        "option":"editmember"
    }
    #成员操作
    def member_option(self):

        if self.option_dict['option_page'] == "more":
            self.find(MobileBy.ID, "com.tencent.wework:id/h8g").click()
            if self.option_dict["option"] == "editmember":
                self.find(MobileBy.XPATH, "//*[@text='编辑成员']").click()
                return EditMemberPage(self.driver)